Bug 539164 – Windows' System Menu blocks main loop
authorCody Russell <bratsche@gnome.org>
Tue, 1 Jul 2008 23:13:26 +0000 (23:13 +0000)
committerCody Russell <bratsche@src.gnome.org>
Tue, 1 Jul 2008 23:13:26 +0000 (23:13 +0000)
2008-07-01  Cody Russell  <bratsche@gnome.org>

        Bug 539164 – Windows' System Menu blocks main loop

        * gdk/win32/gdkevents-win32.c: Use a modal timer proc in between
receiving WM_ENTERMENULOOP and WM_EXITMENULOOP and pump the
GLib mainloop from there.

svn path=/trunk/; revision=20726

ChangeLog
gdk/win32/gdkevents-win32.c

index a5d8e621e75271ab8ca957509be4a82b9a7de66b..985851c1dfd4927b762390a2bd909f3e11d29f99 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-07-01  Cody Russell  <bratsche@gnome.org>
+
+       Bug 539164 – Windows' System Menu blocks main loop
+
+       * gdk/win32/gdkevents-win32.c: Use a modal timer proc in between
+       receiving WM_ENTERMENULOOP and WM_EXITMENULOOP and pump the
+       GLib mainloop from there.
+
 2008-07-01  Richard Hult  <richard@imendio.com>
 
        Some aftermath from the window impl cleanups:
index f3a95953ba4c20af0986e08983eb61966a233eb8..b2b4ada3b2392aefbcd99f659fb46b8d07d9db85 100644 (file)
@@ -138,7 +138,7 @@ static HKL latin_locale = NULL;
 #endif
 
 static gboolean in_ime_composition = FALSE;
-static UINT     resize_timer;
+static UINT     modal_timer;
 
 static int debug_indent = 0;
 
@@ -2030,7 +2030,7 @@ handle_stuff_while_moving_or_resizing (void)
 }
 
 static VOID CALLBACK
-resize_timer_proc (HWND     hwnd,
+modal_timer_proc (HWND     hwnd,
                   UINT     msg,
                   UINT     id,
                   DWORD    time)
@@ -2972,12 +2972,22 @@ gdk_event_translate (MSG  *msg,
 
     case WM_ENTERSIZEMOVE:
       _sizemove_in_progress = TRUE;
-      resize_timer = SetTimer (NULL, 0, 20, resize_timer_proc);
+      modal_timer = SetTimer (NULL, 0, 20, modal_timer_proc);
       break;
 
     case WM_EXITSIZEMOVE:
       _sizemove_in_progress = FALSE;
-      KillTimer (NULL, resize_timer);
+      KillTimer (NULL, modal_timer);
+      break;
+
+    case WM_ENTERMENULOOP:
+      _sizemove_in_progress = TRUE;
+      modal_timer = SetTimer (NULL, 0, 20, modal_timer_proc);
+      break;
+
+    case WM_EXITMENULOOP:
+      _sizemove_in_progress = FALSE;
+      KillTimer (NULL, modal_timer);
       break;
 
     case WM_WINDOWPOSCHANGED :